-
Notifications
You must be signed in to change notification settings - Fork 63
Do not depend on GOPATH to locate test data #122
Conversation
GOPATH is not mandatory to have now and the source code may not be stored under GOPATH.
Codecov Report
@@ Coverage Diff @@
## master #122 +/- ##
==========================================
- Coverage 62.39% 62.34% -0.05%
==========================================
Files 104 104
Lines 7752 7758 +6
==========================================
Hits 4837 4837
- Misses 2345 2351 +6
Partials 570 570
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
} | ||
|
||
configAccessor := viper.NewAccessor(config.Options{ | ||
SearchPaths: searchPaths, | ||
SearchPaths: []string{filepath.Join(pwd, "../testdata", fileName)}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much, but what do you think about moving the test yaml to this folder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does not need to part of this change, we can file a bug and handle it as a follow up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I prefer that in a separated PR because it is not really part of this fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
GOPATH is not mandatory to have now and the source code may not be stored under GOPATH.
TL;DR
GOPATH is not mandatory to have now and the source code may not be stored under GOPATH.
Type
Are all requirements met?
Complete description
Use
os.Getwd()
to get current directory and then join path.Tracking Issue
flyteorg/flyte#498
Follow-up issue